<template>
  <header>
    <div class="mask"></div>
    <div class="content">
      <div class="img">
        <img :src="$store.state.sellerIofo.avatar" alt="" />
      </div>
      <div class="title">
        <h2>{{ $store.state.sellerIofo.name }}{{}}</h2>
        <p>{{ $store.state.sellerIofo.description }}/38分钟送达</p>
        <p>在线支付满28减5，满50减10</p>
        <div class="icon">5个<span>&gt;</span></div>
      </div>
    </div>
    <div class="tips">
      <p>{{ $store.state.sellerIofo.bulletin }}</p>
    </div>
  </header>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
header {
  height: 35.733vw;
  background-repeat: no-repeat;
  background-size: cover;
  // background-image: url(`this.$store.state.sellerIofo.avatar`);
  position: relative;
  width: 100vw;

  .tips {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 7.467vw;
    background-color: rgba(0, 0, 0, 0.2);
    padding-left: 3.2vw;
    padding-right: 3.2vw;
    box-sizing: border-box;
    width: 100%;

    p {
      font-size: 2.667vw;
      color: white;
      font-weight: 200;
      line-height: 7.467vw;
      width: 100%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;

      &::before {
        content: "公告";
        color: black;
        width: 5.867vw;
        height: 3.2vw;
        background: white;
        font-weight: 600;
        margin-right: 1.067vw;
      }
    }
  }

  .mask {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgba(7, 17, 27, 0.5);
    //设置模糊效果
    backdrop-filter: blur(10px);
  }

  .content {
    display: flex;
    position: absolute;
    left: 0;
    margin: 6.4vw 0 0 6.4vw;

    .img {
      width: 17.067vw;
      height: 17.067vw;
      border-radius: 0.533vw;
      overflow: hidden;
      margin-right: 4.267vw;

      img {
        width: 100%;
        height: 100%;
      }
    }

    .title {
      position: relative;
      .icon{
        text-align: center;
        position: absolute;
        height: 6.4vw;
        width: 11.733vw;
        font-size: 2.667vw;
        color: rgb(255, 255, 255);
        font-weight: 200;
        line-height: 6.4vw;
        background-color: rgba(0, 0, 0, 0.2);
        right: -19.333vw;
        bottom: -1.333vw;
        border-radius: 4vw;
        span{
          margin-left: 0.533vw;
        }
      }
      h2 {
        font-size: 4.267vw;
        color: rgb(255, 255, 255);
        font-weight: bold;
        line-height: 4.8vw;
        margin-top: 0.533vw;
        margin-bottom: 2.133vw;

        &::before {
          content: "品牌";
          color: white;
          width: 8vw;
          height: 4.8vw;
          font-weight: 500;
          display: inline-block;
          font-size: 2.667vw;
          text-align: center;
          // padding: 0.267vw;
          background-color: red;
          margin-right: 1.6vw;
        }
      }

      h2+p {
        font-size: 3.2vw;
        color: rgb(255, 255, 255);
        font-weight: 200;
        line-height: 3.2vw;
        margin-bottom: 2.667vw;
      }

      p+p {
        font-size: 2.667vw;
        color: rgb(255, 255, 255);
        font-weight: 200;
        line-height: 3.2vw;
      }
    }
  }
}
</style>